// any function in std c++ or boost c++ like fnmatch?

#include <stdlib.h>
#include <stdio.h>
#include <fnmatch.h>

int main( int argc, char *argv[] )
{
	if( argc < 2 ) {
		fprintf( stderr, "fnmatch pattern name\n" );
		exit( 1 );
	}

	int rc = fnmatch( argv[1], argv[2], FNM_NOESCAPE );
	printf( "rc %d\n", rc );
	if( 0 == rc )
		printf( "matched\n" );
	else if( FNM_NOMATCH == rc )
		printf( "no match\n" );
	else
		printf( "error\n" );

	return (0==rc);
}

